<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Anti-spam mailto: Link Creator</title>
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
  <script type='text/javascript' src='../dwr/engine.js'> </script>
  <script type='text/javascript' src='../dwr/util.js'> </script>
  <script type='text/javascript' src='../dwr/interface/Generator.js'> </script>
  <script type='text/javascript' src='../dwr/interface/EmailValidator.js'> </script>
  <script type="text/javascript" src='index.js'> </script>
  <link rel="stylesheet" type="text/css" href="../generic.css" />
</head>

<body>
<div id="page-title">[
  <a href="http://getahead.org/dwr/">DWR Website</a> |
  <a href="..">Web Application Index</a>
]</div>

<h1>Anti-spam mailto: Link Creator.</h1>

<p>
  <code>mailto:</code> links allow you to give people a simple way to send you
  e-mail from a web page. Unfortunately they also allows spammers to harvest
  addresses. The solution is to use a simple script to generate mailto: links.
</p>

<p>
  The following paragraph contains a mailto link generated by Javascript. It
  acts in the normal way, but if you check the source you will see that the
  address is obfusticated enough to be unreadable by spam robots:
</p>

<p style="padding:2px 20px;">
  Contact the helpdesk using: <span id="asmgLink"></span>
  <script type='text/javascript'>
  var before = 'support';
  var after = 'example.com';
  var link = "<a href='mail" + "to:" + before + '@' + after + "'>" + before + '@' + after + "</a>";
  document.getElementById("asmgLink").innerHTML = link;
  </script>
  <noscript>[support at example.com]</noscript>
</p>

<h2>Create Your Own</h2>

<table class="plain">
  <tr>
    <td>EMail Address:</td>
    <td><input type=text" id="address" onkeypress="dwr.util.onReturn(event, process)" onblur="verifyAddress()"/></td>
    <td><span class="error" id="addressError"></span></td>
  </tr>
  <tr>
    <td>Name:</td>
    <td><input type=text" id="name" onkeypress="dwr.util.onReturn(event, process)" onblur="verifyName()"/></td>
    <td><span class="error" id="nameError"></span></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input id="submit" type="submit" value="Submit Query" onclick="process()"/></td>
  </tr>
</table>

<div id="output" style="display:none;">
  <h2>Generated Links</h2>
  <textarea id="outputFull" rows="9" cols="70">
  </textarea>
</div>

</body>
</html>
